<!DOCTYPE html>
<html>

<head>
  <title>Quarkus - Centralized log management (Graylog, Logstash, Fluentd)</title>
  <script id="adobe_dtm" src="https://www.redhat.com/dtm.js" type="text/javascript"></script>
  <script src="/assets/javascript/highlight.pack.js" type="text/javascript"></script>
  <META HTTP-EQUIV='Content-Security-Policy' CONTENT="default-src 'none'; script-src 'self' 'unsafe-eval' 'sha256-ANpuoVzuSex6VhqpYgsG25OHWVA1I+F6aGU04LoI+5s=' 'sha256-ipy9P/3rZZW06mTLAR0EnXvxSNcnfSDPLDuh3kzbB1w=' js.bizographics.com https://www.redhat.com assets.adobedtm.com jsonip.com https://ajax.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com https://use.fontawesome.com; style-src 'self' https://fonts.googleapis.com https://use.fontawesome.com; img-src 'self' *; media-src 'self' ; frame-src https://www.googletagmanager.com https://www.youtube.com; frame-ancestors 'none'; base-uri 'none'; object-src 'none'; form-action 'none'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com;">
  <META HTTP-EQUIV='X-Frame-Options' CONTENT="DENY">
  <META HTTP-EQUIV='X-XSS-Protection' CONTENT="1; mode=block">
  <META HTTP-EQUIV='X-Content-Type-Options' CONTENT="nosniff">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Quarkus: Supersonic Subatomic Java">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@QuarkusIO"> 
  <meta name="twitter:creator" content="@QuarkusIO">
  <meta property="og:url" content="https://quarkus.io/guides/centralized-log-management" />
  <meta property="og:title" content="Quarkus - Centralized log management (Graylog, Logstash, Fluentd)" />
  <meta property="og:description" content="Quarkus: Supersonic Subatomic Java" />
  <meta property="og:image" content="/assets/images/quarkus_card.png" />
  <link rel="canonical" href="https://quarkus.io/guides/centralized-log-management">
  <link rel="shortcut icon" type="image/png" href="/favicon.ico" >
  <link rel="stylesheet" href="https://quarkus.io/guides/stylesheet/config.css" />
  <link rel="stylesheet" href="/assets/css/main.css" />
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
  <link rel="alternate" type="application/rss+xml"  href="https://quarkus.io/feed.xml" title="Quarkus">
  <script src="https://quarkus.io/assets/javascript/goan.js" type="text/javascript"></script>
  <script src="https://quarkus.io/assets/javascript/hl.js" type="text/javascript"></script>
</head>

<body class="guides">
  <!-- Google Tag Manager (noscript) -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NJWS5L"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <!-- End Google Tag Manager (noscript) -->

  <div class="nav-wrapper">
  <div class="grid-wrapper">
    <div class="width-12-12">
      <input type="checkbox" id="checkbox" />
      <nav id="main-nav" class="main-nav">
  <div class="container">
    <div class="logo-wrapper">
      
        <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_600px_reverse.png" class="project-logo" title="Quarkus"></a>
      
    </div>
    <label class="nav-toggle" for="checkbox">
      <i class="fa fa-bars"></i>
    </label>
    <div id="menu" class="menu">
      <span>
        <a href="/get-started/" class="">Get Started</a>
      </span>
      <span>
        <a href="/guides/" class="active">Guides</a>
      </span>
      <span>
        <a href="/community/" class="">Community</a>
      </span>
      <span>
        <a href="/support/" class="">Support</a>
      </span>
      <span>
        <a href="/blog/" class="">Blog</a>
      </span>
      <span>
        <a href="https://code.quarkus.io" class="button-cta secondary white">Start Coding</a>
      </span>
    </div>
  </div>
      </nav>
    </div>
  </div>
</div>

  <div class="content">
    <div class="guide">
  <div class="width-12-12">
    <h1 class="text-caps">Quarkus - Centralized log management (Graylog, Logstash, Fluentd)</h1>
    <div class="hide-mobile toc"><ul class="sectlevel1">
<li><a href="#example-application">Example application</a></li>
<li><a href="#send-logs-to-graylog">Send logs to Graylog</a></li>
<li><a href="#send-logs-to-logstash-the-elastic-stack-elk">Send logs to Logstash / the Elastic Stack (ELK)</a></li>
<li><a href="#send-logs-to-fluentd-efk">Send logs to Fluentd (EFK)</a></li>
<li><a href="#fluentd-alternative-use-syslog">Fluentd alternative: use Syslog</a></li>
<li><a href="#configuration-reference">Configuration Reference</a></li>
</ul></div>
    <div>
      <div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>This guide explains how you can send your logs to a centralized log management system like Graylog, Logstash (inside the Elastic Stack or ELK - Elasticsearch, Logstash, Kibana) or
Fluentd (inside EFK - Elasticsearch, Fluentd, Kibana).</p>
</div>
<div class="paragraph">
<p>There are a lot of different ways to centralize your logs (if you are using Kubernetes, the simplest way is to log to the console and ask you cluster administrator to integrate a central log manager inside your cluster).
In this guide, we will expose how to send them to an external tool using the <code>quarkus-logging-gelf</code> extension that can use TCP or UDP to send logs in the Graylog Extended Log Format (GELF).</p>
</div>
<div class="paragraph">
<p>The <code>quarkus-logging-gelf</code> extension will add a GELF log handler to the underlying logging backend that Quarkus uses (jboss-logmanager).
By default, it is disabled, if you enable it but still use another handler (by default the console handler is enabled), your logs will be sent to both handlers.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="example-application"><a class="anchor" href="#example-application"></a>Example application</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The following examples will all be based on the same example application that you can create with the following steps.</p>
</div>
<div class="paragraph">
<p>Create an application with the <code>quarkus-logging-gelf</code> extension. You can use the following Maven command to create it:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">mvn io.quarkus:quarkus-maven-plugin:1.7.0.Final:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=gelf-logging \
    -DclassName="org.acme.quickstart.GelfLoggingResource" \
    -Dpath="/gelf-logging" \
    -Dextensions="logging-gelf"</code></pre>
</div>
</div>
<div class="paragraph">
<p>If you already have your Quarkus project configured, you can add the <code>logging-gelf</code> extension
to your project by running the following command in your project base directory:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="bash" class="language-bash hljs">./mvnw quarkus:add-extension -Dextensions="logging-gelf"</code></pre>
</div>
</div>
<div class="paragraph">
<p>This will add the following to your <code>pom.xml</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="xml" class="language-xml hljs">&lt;dependency&gt;
    &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
    &lt;artifactId&gt;quarkus-logging-gelf&lt;/artifactId&gt;
&lt;/dependency&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>For demonstration purposes, we create an endpoint that does nothing but log a sentence. You don&#8217;t need to do this inside your application.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;

import org.jboss.logging.Logger;

@Path("/gelf-logging")
@ApplicationScoped
public class GelfLoggingResource {
    private static final Logger LOG = Logger.getLogger(GelfLoggingResource.class);

    @GET
    public void log() {
        LOG.info("Some useful log message");
    }

}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Configure the GELF log handler to send logs to an external UDP endpoint on the port 12201:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.log.handler.gelf.enabled=true
quarkus.log.handler.gelf.host=localhost
quarkus.log.handler.gelf.port=12201</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="send-logs-to-graylog"><a class="anchor" href="#send-logs-to-graylog"></a>Send logs to Graylog</h2>
<div class="sectionbody">
<div class="paragraph">
<p>To send logs to Graylog, you first need to launch the components that compose the Graylog stack:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>MongoDB</p>
</li>
<li>
<p>Elasticsearch</p>
</li>
<li>
<p>Graylog</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You can do this via the following docker-compose file that you can launch via <code>docker-compose run -d</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="yaml" class="language-yaml hljs">version: '3.2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
    ports:
      - "9200:9200"
    environment:
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
    networks:
      - graylog

  mongo:
    image: mongo:4.0
    networks:
      - graylog

  graylog:
    image: graylog/graylog:3.1
    ports:
      - "9000:9000"
      - "12201:12201/udp"
      - "1514:1514"
    environment:
      GRAYLOG_HTTP_EXTERNAL_URI: "http://127.0.0.1:9000/"
    networks:
      - graylog
    depends_on:
      - elasticsearch
      - mongo

networks:
  graylog:
    driver: bridge</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then, you need to create a UDP input in Graylog.
You can do it from the Graylog web console (System &#8594; Input &#8594; Select GELF UDP) available at <a href="http://localhost:9000" class="bare">http://localhost:9000</a> or via the API.</p>
</div>
<div class="paragraph">
<p>This curl example will create a new Input of type GELF UDP, it uses the default login from Graylog (admin/admin).</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="shell" class="language-shell hljs">curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "X-Requested-By: curl" -X POST -v -d \
'{"title":"udp input","configuration":{"recv_buffer_size":262144,"bind_address":"0.0.0.0","port":12201,"decompress_size_limit":8388608},"type":"org.graylog2.inputs.gelf.udp.GELFUDPInput","global":true}' \
http://localhost:9000/api/system/inputs</code></pre>
</div>
</div>
<div class="paragraph">
<p>Launch your application, you should see your logs arriving inside Graylog.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="send-logs-to-logstash-the-elastic-stack-elk"><a class="anchor" href="#send-logs-to-logstash-the-elastic-stack-elk"></a>Send logs to Logstash / the Elastic Stack (ELK)</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Logstash comes by default with an Input plugin that can understand the GELF format, we will first create a pipeline that enables this plugin.</p>
</div>
<div class="paragraph">
<p>Create the following file  in <code>$HOME/pipelines/gelf.conf</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">input {
  gelf {
    port =&gt; 12201
  }
}
output {
  stdout {}
  elasticsearch {
    hosts =&gt; ["http://elasticsearch:9200"]
  }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Finally, launch the components that compose the Elastic Stack:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Elasticsearch</p>
</li>
<li>
<p>Logstash</p>
</li>
<li>
<p>Kibana</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You can do this via the following docker-compose file that you can launch via <code>docker-compose run -d</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="yaml" class="language-yaml hljs"># Launch Elasticsearch
version: '3.2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
    networks:
      - elk

  logstash:
    image: docker.elastic.co/logstash/logstash-oss:6.8.2
    volumes:
      - source: $HOME/pipelines
        target: /usr/share/logstash/pipeline
        type: bind
    ports:
      - "12201:12201/udp"
      - "5000:5000"
      - "9600:9600"
    networks:
      - elk
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.8.2
    ports:
      - "5601:5601"
    networks:
      - elk
    depends_on:
      - elasticsearch

networks:
  elk:
    driver: bridge</code></pre>
</div>
</div>
<div class="paragraph">
<p>Launch your application, you should see your logs arriving inside the Elastic Stack; you can use Kibana available at <a href="http://localhost:5601/" class="bare">http://localhost:5601/</a> to access them.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="send-logs-to-fluentd-efk"><a class="anchor" href="#send-logs-to-fluentd-efk"></a>Send logs to Fluentd (EFK)</h2>
<div class="sectionbody">
<div class="paragraph">
<p>First, you need to create a Fluentd image with the needed plugins: elasticsearch and input-gelf.
You can use the following Dockerfile that should be created inside a <code>fluentd</code> directory.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">FROM fluent/fluentd:v1.3-debian
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--version", "3.7.0"]
RUN ["gem", "install", "fluent-plugin-input-gelf", "--version", "0.3.1"]</code></pre>
</div>
</div>
<div class="paragraph">
<p>You can build the image or let docker-compose build it for you.</p>
</div>
<div class="paragraph">
<p>Then you need to create a fluentd configuration file inside <code>$HOME/fluentd/fluent.conf</code></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">&lt;source&gt;
  type gelf
  tag example.gelf
  bind 0.0.0.0
  port 12201
&lt;/source&gt;

&lt;match example.gelf&gt;
  @type elasticsearch
  host elasticsearch
  port 9200
  logstash_format true
&lt;/match&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>Finally, launch the components that compose the EFK Stack:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Elasticsearch</p>
</li>
<li>
<p>Fluentd</p>
</li>
<li>
<p>Kibana</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You can do this via the following docker-compose file that you can launch via <code>docker-compose run -d</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="yaml" class="language-yaml hljs">version: '3.2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
    networks:
      - efk

  fluentd:
    build: fluentd
    ports:
      - "12201:12201/udp"
    volumes:
      - source: $HOME/fluentd
        target: /fluentd/etc
        type: bind
    networks:
      - efk
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.8.2
    ports:
      - "5601:5601"
    networks:
      - efk
    depends_on:
      - elasticsearch

networks:
  efk:
    driver: bridge</code></pre>
</div>
</div>
<div class="paragraph">
<p>Launch your application, you should see your logs arriving inside EFK: you can use Kibana available at <a href="http://localhost:5601/" class="bare">http://localhost:5601/</a> to access them.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="fluentd-alternative-use-syslog"><a class="anchor" href="#fluentd-alternative-use-syslog"></a>Fluentd alternative: use Syslog</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can also send your logs to Fluentd using a Syslog input.
As opposed to the GELF input, the Syslog input will not render multiline logs in one event, that&#8217;s why we advise to use the GELF input that we implement in Quarkus.</p>
</div>
<div class="paragraph">
<p>First, you need to create a Fluentd image with the elasticsearch plugin.
You can use the following Dockerfile that should be created inside a <code>fluentd</code> directory.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">FROM fluent/fluentd:v1.3-debian
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--version", "3.7.0"]</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then, you need to create a fluentd configuration file inside <code>$HOME/fluentd/fluent.conf</code></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-none hljs">&lt;source&gt;
  @type syslog
  port 5140
  bind 0.0.0.0
  message_format rfc5424
  tag system
&lt;/source&gt;

&lt;match **&gt;
  @type elasticsearch
  host elasticsearch
  port 9200
  logstash_format true
&lt;/match&gt;</code></pre>
</div>
</div>
<div class="paragraph">
<p>Then, launch the components that compose the EFK Stack:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Elasticsearch</p>
</li>
<li>
<p>Fluentd</p>
</li>
<li>
<p>Kibana</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>You can do this via the following docker-compose file that you can launch via <code>docker-compose run -d</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="yaml" class="language-yaml hljs">version: '3.2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      ES_JAVA_OPTS: "-Xms512m -Xmx512m"
    networks:
      - efk

  fluentd:
    build: fluentd
    ports:
      - "5140:5140/udp"
    volumes:
      - source: $HOME/fluentd
        target: /fluentd/etc
        type: bind
    networks:
      - efk
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.8.2
    ports:
      - "5601:5601"
    networks:
      - efk
    depends_on:
      - elasticsearch

networks:
  efk:
    driver: bridge</code></pre>
</div>
</div>
<div class="paragraph">
<p>Finally, configure your application to send logs to EFK using Syslog:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="properties" class="language-properties hljs">quarkus.log.syslog.enable=true
quarkus.log.syslog.endpoint=localhost:5140
quarkus.log.syslog.protocol=udp
quarkus.log.syslog.app-name=quarkus
quarkus.log.syslog.hostname=quarkus-test</code></pre>
</div>
</div>
<div class="paragraph">
<p>Launch your application, you should see your logs arriving inside EFK: you can use Kibana available at <a href="http://localhost:5601/" class="bare">http://localhost:5601/</a> to access them.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration-reference"><a class="anchor" href="#configuration-reference"></a>Configuration Reference</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Configuration is done through the usual <code>application.properties</code> file.</p>
</div>
<div class="paragraph configuration-legend">
<p><span class="icon"><i class="fa fa-lock" title="Fixed at build time"></i></span> Configuration property fixed at build time - All other configuration properties are overridable at runtime</p>
</div>
<table class="tableblock frame-all grid-all stretch configuration-reference searchable">
<colgroup>
<col style="width: 80%;">
<col style="width: 10%;">
<col style="width: 10%;">
</colgroup>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-logging-gelf_configuration"></a><a href="#quarkus-logging-gelf_configuration">Configuration property</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.enabled"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.enabled">quarkus.log.handler.gelf.enabled</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Determine whether to enable the GELF logging handler</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.host"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.host">quarkus.log.handler.gelf.host</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Hostname/IP-Address of the Logstash/Graylog Host By default it uses UDP, prepend tcp: to the hostname to switch to TCP, example: "tcp:localhost"</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>localhost</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.port"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.port">quarkus.log.handler.gelf.port</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The port</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>12201</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.version"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.version">quarkus.log.handler.gelf.version</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>GELF version: 1.0 or 1.1</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>1.1</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.extract-stack-trace"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.extract-stack-trace">quarkus.log.handler.gelf.extract-stack-trace</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether to post Stack-Trace to StackTrace field.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>true</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.stack-trace-throwable-reference"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.stack-trace-throwable-reference">quarkus.log.handler.gelf.stack-trace-throwable-reference</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Only used when <code>extractStackTrace</code> is <code>true</code>. A value of 0 will extract the whole stack trace. Any positive value will walk the cause chain: 1 corresponds with exception.getCause(), 2 with exception.getCause().getCause(), &#8230;&#8203; Negative throwable reference walk the exception chain from the root cause side: -1 will extract the root cause, -2 the exception wrapping the root cause, &#8230;&#8203;</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>0</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.filter-stack-trace"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.filter-stack-trace">quarkus.log.handler.gelf.filter-stack-trace</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether to perform Stack-Trace filtering</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.timestamp-pattern"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.timestamp-pattern">quarkus.log.handler.gelf.timestamp-pattern</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Java date pattern, see <code>java.text.SimpleDateFormat</code></p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>yyyy-MM-dd HH:mm:ss,SSS</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.level"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.level">quarkus.log.handler.gelf.level</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>The logging-gelf log level.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/org/jboss/logmanager/Level.html">Level</a></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>ALL</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.facility"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.facility">quarkus.log.handler.gelf.facility</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Name of the facility.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>jboss-logmanager</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.include-full-mdc"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.include-full-mdc">quarkus.log.handler.gelf.include-full-mdc</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Whether to include all fields from the MDC.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">boolean</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.maximum-message-size"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.maximum-message-size">quarkus.log.handler.gelf.maximum-message-size</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Maximum message size (in bytes). If the message size is exceeded, the appender will submit the message in multiple chunks.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">int</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>8192</code></p></td>
</tr>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock"><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field"></a><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field">Post additional fields</a></p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Type</p></th>
<th class="tableblock halign-left valign-middle"><p class="tableblock">Default</p></th>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field.-field-name-.value"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field.-field-name-.value">quarkus.log.handler.gelf.additional-field."field-name".value</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Additional field value.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">required <span class="icon"><i class="fa fa-exclamation-circle" title="Configuration property is required"></i></span></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a id="quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field.-field-name-.type"></a><code><a href="#quarkus-logging-gelf_quarkus.log.handler.gelf.additional-field.-field-name-.type">quarkus.log.handler.gelf.additional-field."field-name".type</a></code></p>
</div>
<div class="openblock description">
<div class="content">
<div class="paragraph">
<p>Additional field type specification. Supported types: String, long, Long, double, Double and discover. Discover is the default if not specified, it discovers field type based on parseability.</p>
</div>
</div>
</div></div></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><code>discover</code></p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>This extension uses the <code>logstash-gelf</code> library that allow more configuration options via system properties,
you can access its documentation here: <a href="https://logging.paluch.biz/" class="bare">https://logging.paluch.biz/</a> .</p>
</div>
</div>
</div>
    </div>
  </div>
</div>

  </div>

  <div class="content project-footer">
  <div class="footer-section">
    <div class="logo-wrapper">
      <a href="/"><img src="/assets/images/quarkus_logo_horizontal_rgb_reverse.svg" class="project-logo" title="Quarkus"></a>
    </div>
  </div>
  <div class="grid-wrapper">
    <p class="grid__item width-3-12">Quarkus is open. All dependencies of this project are available under the <a href='https://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache Software License 2.0</a> or compatible license.<br /><br />This website was built with <a href='https://jekyllrb.com/' target='_blank'>Jekyll</a>, is hosted on <a href='https://pages.github.com/' target='_blank'>Github Pages</a> and is completely open source. If you want to make it better, <a href='https://github.com/quarkusio/quarkusio.github.io' target='_blank'>fork the website</a> and show us what you’ve got.</p>

    
      <div class="width-1-12 project-links">
        <span>Navigation</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="/">Home</a></li>
          
            <li><a href="/guides">Guides</a></li>
          
            <li><a href="/community/#contributing">Contribute</a></li>
          
            <li><a href="/faq">FAQ</a></li>
          
            <li><a href="/get-started">Get Started</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Contribute</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://twitter.com/quarkusio">Follow us</a></li>
          
            <li><a href="https://github.com/quarkusio">GitHub</a></li>
          
            <li><a href="/security">Security&nbsp;policy</a></li>
          
        </ul>
      </div>
    
      <div class="width-1-12 project-links">
        <span>Get Help</span>
        <ul class="footer-links width-1-12">
          
            <li><a href="https://groups.google.com/forum/#!forum/quarkus-dev">Forums</a></li>
          
            <li><a href="https://quarkusio.zulipchat.com">Chatroom</a></li>
          
        </ul>
      </div>
    

    
      <div class="width-3-12 more-links">
        <span>Quarkus is made of community projects</span>
        <ul class="footer-links">
          
            <li><a href="https://vertx.io/" target="_blank">Eclipse Vert.x</a></li>
          
            <li><a href="https://microprofile.io" target="_blank">Eclipse MicroProfile</a></li>
          
            <li><a href="https://hibernate.org" target="_blank">Hibernate</a></li>
          
            <li><a href="https://netty.io" target="_blank">Netty</a></li>
          
            <li><a href="https://resteasy.github.io" target="_blank">RESTEasy</a></li>
          
            <li><a href="https://camel.apache.org" target="_blank">Apache Camel</a></li>
          
            <li><a href="https://code.quarkus.io/" target="_blank">And many more...</a></li>
          
        </ul>
      </div>
    
  </div>
</div>
  <div class="content redhat-footer">
  <div class="grid-wrapper">
    <span class="licence">
      <i class="fab fa-creative-commons"></i><i class="fab fa-creative-commons-by"></i> <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC by 3.0</a> | <a href="https://www.redhat.com/en/about/privacy-policy">Privacy Policy</a>
    </span>
    <span class="redhat">
      Sponsored by
    </span>
    <span class="redhat-logo">
      <a href="https://www.redhat.com/" target="_blank"><img src="/assets/images/redhat_reversed.svg"></a>
    </span>
  </div>
</div>


  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script>
  <script type="text/javascript" src="/assets/javascript/mobile-nav.js"></script>
  <script type="text/javascript" src="/assets/javascript/scroll-down.js"></script>
  <script src="/assets/javascript/satellite.js" type="text/javascript"></script>
  <script src="https://quarkus.io/guides/javascript/config.js" type="text/javascript"></script>
  <script src="/assets/javascript/search-filter.js" type="text/javascript"></script>
  <script src="/assets/javascript/back-to-top.js" type="text/javascript"></script>
</body>

</html>
